package com.dataseek.iot.device.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName(value = "tenant.day_use")
public class DayUse {
    @TableId(value = "day_use_id", type = IdType.AUTO)
    private Long dayUseId;

    @TableField(value = "jar_code")
    private String jarCode;

    @TableField(value = "device_code")
    private String deviceCode;

    @TableField(value = "last_level")
    private BigDecimal lastLevel;

    @TableField(value = "used_amount")
    private BigDecimal usedAmount;

    //创建时间
    @TableField(value="create_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    //更新时间
    @TableField(value="update_time",fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @TableField(value = "cal_date")
    private String calDate;

    @TableField(value = "used_amount_vol")
    private BigDecimal usedAmountVol;
}
